package com.xiaoshuidi.cloud.module.member.pojo.activities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.KeySequence;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaoshuidi.cloud.framework.tenant.core.db.TenantBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;


@TableName(value = "member_activities", autoResultMap = true)
@KeySequence("member_activities_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库，可不写。
@Data
@EqualsAndHashCode(callSuper = true)
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
public class MemberActivities extends TenantBaseDO {
    private static final long serialVersionUID = -6465201762528580478L;

    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    @Schema(description = "主键")
    private Long id;

    @Schema(description = "活动名称")
    private String name;

    @Schema(description = "活动主图")
    private String picture;

    @Schema(description = "权重")
    private Integer weight;

    @Schema(description = "1-线上活动,2-线下活动")
    private Integer onOff;

    @Schema(description = "活动地址")
    private String address;

    @Schema(description = "活动开始时间")
    private LocalDateTime beginTime;

    @Schema(description = "活动结束时间")
    private LocalDateTime endTime;

    @Schema(description = "活动报名开始时间")
    private LocalDateTime enrollBegin;

    @Schema(description = "活动报名结束时间")
    private LocalDateTime enrollEnd;

    @Schema(description = "活动人数")
    private Integer num;

    @Schema(description = "活动项名称")
    private String fillItem;

    @Schema(description = "详细描述")
    private String details;

    @Schema(description = "奖励积分")
    private Integer bonusPoints;
}
